﻿using System.Configuration;

namespace ALinq.BBS.Common.Config
{
    public class AttachmentsViewElement : ConfigurationElement
    {
        [ConfigurationProperty("id")]
        public int ID
        {
            get { return (int)base["id"]; }
            set { base["id"] = value; }
        }

        [ConfigurationProperty("path")]
        public string Path
        {
            get { return (string)base["path"]; }
        }

        [ConfigurationProperty("name")]
        public string Name
        {
            get { return (string)base["name"]; }
        }
    }

    public class AttachmentsViewElementCollection : ConfigurationElementCollection<AttachmentsViewElement>
    {
        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((AttachmentsViewElement)element).ID;
        }
    }
}